-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(sdk): improve input handling and separate input from options #2993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryThis PR refactors SDK input handling to align both TypeScript and Python SDKs with the curl/API behavior. The key changes:
The refactoring improves API ergonomics by making the calling pattern more intuitive - Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client as SDK Client
participant API as Sim API
Note over Client: Input Handling Logic
alt Dict/Object Input
Client->>Client: Spread at root level<br/>{ticker: "NVDA"} → {ticker: "NVDA"}
else Primitive/Array Input
Client->>Client: Wrap in input field<br/>"NVDA" → {input: "NVDA"}
end
Client->>Client: Convert files to base64
Client->>Client: Add options (stream, selectedOutputs)
alt Async Execution
Client->>API: POST /api/workflows/:id/execute<br/>Header: X-Execution-Mode: async
API-->>Client: 202 {taskId, status: "queued"}
else Sync Execution
Client->>API: POST /api/workflows/:id/execute
API-->>Client: 200 {success, output}
end
Note over Client: Retry Logic
alt Rate Limited (429)
API-->>Client: 429 Rate Limit Exceeded
Client->>Client: Wait with exponential backoff
Client->>API: Retry request
API-->>Client: 200 Success
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No files reviewed, no comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Summary
{input: value}inputparameter fromoptionsto match curl/API behaviorRateLimitStatusclass and dead code from Python SDKType of Change
Testing
Checklist